package com.xingxuecn.demos;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.text.SimpleDateFormat;

/**
 * Bean 和 Configuration配合使用，用于编码生成bean
 * @author Kris at 2018/9/26 10:30
 */
@Configuration
public class BeansConfig {

    @Bean
    public SimpleDateFormat simpleDateFormat(){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return sdf;
    }
}
